import 'dart:convert';

EvaluationLinguisticKnowledgeResult evaluationLinguisticKnowledgeResultFromJson(String str) => EvaluationLinguisticKnowledgeResult.fromJson(json.decode(str));

String evaluationLinguisticKnowledgeResultToJson(EvaluationLinguisticKnowledgeResult data) => json.encode(data.toJson());

class EvaluationLinguisticKnowledgeResult {
    EvaluationLinguisticKnowledgeResult({
        this.status,
        this.message,
        this.result,
    });

    int? status;
    String? message;
    LinguisticKnowledgeData? result;

    factory EvaluationLinguisticKnowledgeResult.fromJson(Map<String, dynamic> json) => EvaluationLinguisticKnowledgeResult(
        status: json["status"],
        message: json["message"],
        result: json["result"]!=null ? LinguisticKnowledgeData.fromJson(json["result"]): null,
    );

    Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result?.toJson(),
    };
}

class LinguisticKnowledgeData {
    LinguisticKnowledgeData({
        this.grammar,
        this.phrase,
        this.syllable,
        this.word,
    });

    TotalProgress? grammar;
    TotalProgress? phrase;
    TotalProgress? syllable;
    Word? word;

    factory LinguisticKnowledgeData.fromJson(Map<String, dynamic> json) => LinguisticKnowledgeData(
        grammar:json["grammar"]!=null ? TotalProgress.fromJson(json["grammar"]): null,
        phrase: json["phrase"]!=null ? TotalProgress.fromJson(json["phrase"]): null,
        syllable: json["syllable"]!=null ? TotalProgress.fromJson(json["syllable"]): null,
        word: json["word"]!=null ? Word.fromJson(json["word"]): null,
    );

    Map<String, dynamic> toJson() => {
        "grammar": grammar?.toJson(),
        "phrase": phrase?.toJson(),
        "syllable": syllable?.toJson(),
        "word": word?.toJson(),
    };
}

class TotalProgress {
    TotalProgress({
        this.total,
        this.progress,
    });

    int? total;
    int? progress;

    factory TotalProgress.fromJson(Map<String, dynamic> json) => TotalProgress(
        total: json["total"]!=null ? json["total"] : 0,
        progress: json["progress"]!=null ?json["progress"]: 0,
    );

    Map<String, dynamic> toJson() => {
        "total": total,
        "progress": progress,
    };
}

class Word {
    Word({
        this.total,
        this.handWriting,
        this.progress,
    });

    int? total;
    HandWriting? handWriting;
    int? progress;

    factory Word.fromJson(Map<String, dynamic> json) => Word(
        total: json["total"],
        handWriting:json["handWriting"]!=null ? HandWriting.fromJson(json["handWriting"]): null,
        progress: json["progress"],
    );

    Map<String, dynamic> toJson() => {
        "total": total,
        "handWriting": handWriting?.toJson(),
        "progress": progress,
    };
}

class HandWriting {
    HandWriting({
        this.low,
        this.medium,
    });

    TotalProgress? low;
    TotalProgress? medium;

    factory HandWriting.fromJson(Map<String, dynamic> json) => HandWriting(
        low: json["low"]!=null ? TotalProgress.fromJson(json["low"]): null,
        medium: json["medium"]!=null ? TotalProgress.fromJson(json["medium"]): null,
    );

    Map<String, dynamic> toJson() => {
        "low": low?.toJson(),
        "medium": medium?.toJson(),
    };
}
